<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用人单位信息管理--增加</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
	//添加记录
	function addPayoff(){
		var arr = showModalDialog("<%=request.getContextPath()%>/admin/payoffAdd.jsp?bid=${param.bid}", "", "dialogWidth:450pt;dialogHeight:148pt;help:0;status:0");
		document.location.reload();
	}
	//修改记录
	function updatePayoff(pid){
		var arr = showModalDialog("<%=request.getContextPath()%>/Payoff.do?method=toPayoffUpdate&pid=" + pid, "", "dialogWidth:450pt;dialogHeight:148pt;help:0;status:0");
		document.location.reload();
	}
	//查看记录
	function detailPayoff(pid){
		var arr = showModalDialog("<%=request.getContextPath()%>/Payoff.do?method=detailPayoff&pid=" + pid, "", "dialogWidth:450pt;dialogHeight:148pt;help:0;status:0");
	}
</script>
</head>

<body>
<table width="70%">
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>欠薪单位：</p>
    </td>
    <td width="75%" align="left" >${bInfo.employerInfo.empInfoName}&nbsp;</td>
  </tr>
  <tr>
    <td class="bg_blue"align="right">欠薪月份：</td>
    <td align="left">
    <fmt:formatDate pattern="yyyy-MM" value="${bInfo.backPayMonth}"/>
    </td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>欠薪人数：</p>
    </td>
    <td width="75%" align="left" >${bInfo.backPayPensonNum}&nbsp;</td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>欠薪金额：</p>
    </td>
    <td width="75%" align="left" >${bInfo.backPayMoney}&nbsp;</td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">说明：</td>
    <td align="left">${bInfo.backPayRemark}</td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">状态：</td>
    <td align="left">
    <c:choose>
	 <c:when test="${bInfo.backPayState == '0'}">未确认</c:when>
	 <c:when test="${bInfo.backPayState == '1'}">核实处理中</c:when>
	 <c:when test="${bInfo.backPayState == '2'}">已办结</c:when>
	 </c:choose>
    </td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">是否立案：</td>
    <td align="left">
    <c:choose>
	 <c:when test="${bInfo.backPayIsCase == '0'}">未立案</c:when>
	 <c:when test="${bInfo.backPayIsCase == '1'}">已立案</c:when>
	 </c:choose>
    </td>
  </tr>
  <c:if test="${bInfo.backPayState != '0'}">
  <tr>
    <td class="bg_blue" align="right">补发工资记录：</td>
    <td align="left">
    <c:if test="${bInfo.backPayState == '1'}"><a href="#" onclick="addPayoff()">添加记录</a><br/></c:if>
    <c:if test="${empty poList}">
    <font color="#FF0000">没有补发记录</font>
    </c:if>
    <c:forEach items="${poList}" var="prod" varStatus="lineInfo">
    <fmt:formatDate pattern="yyyy-MM-dd" value="${prod.payoffDate}"/> 补发记录
    <a href="#" onclick="detailPayoff('${prod.payoffId}')">查看</a>
    <c:if test="${bInfo.backPayState == '1'}">
    <a href="#" onclick="updatePayoff('${prod.payoffId}')">修改</a>
    <a href="#" onclick="javascript:if(confirm('确定要删除该数据吗？')){window.location.href='<%=request.getContextPath()%>/Payoff.do?method=deletePayoff&pid=${prod.payoffId}'}">删除</a>
    </c:if>
    <br/>
    </c:forEach>
    </td>
  </tr>
  </c:if>
  <tr>
    <td class="nohover" colspan="2" align="center">
    <c:if test="${bInfo.backPayState == '0'}">
    <input class="buttonnormal" type="button" value="核实" onClick="if(confirm('确定要核实该欠薪记录吗？')){window.location.href='<%=request.getContextPath()%>/BackPay.do?method=sbt&bid=${param.bid}'}">
    </c:if>
    <c:if test="${bInfo.backPayState == '1'}">
    <input class="buttonhuibao" type="button" value="办结" onClick="if(confirm('确定要办结该欠薪记录吗？')){window.location.href='<%=request.getContextPath()%>/BackPay.do?method=over&bid=${param.bid}'}">
    <c:if test="${bInfo.backPayIsCase == '0'}">
    <input class="buttonnormal" type="button" value="立案" onClick="if(confirm('确定要对该欠薪记录进行立案吗？')){window.location.href='<%=request.getContextPath()%>/BackPay.do?method=toCase&bid=${param.bid}'}">
    </c:if>
    </c:if>
    <input class="buttonreturn" type="button" value="返回" onClick="window.location.href='<%=request.getContextPath()%>/BackPay.do?method=list'">
    </td>
  </tr>
</table>
</body>
</html>
